export default class StoreLine {
  /**
   * @typedef {Object} InputObject
   * @description 输入对象
   * @property {string} SUB_ROUTEID 车辆ID
   * @property {string} BUS_NAME 线路名字
   * @property {string} BUS_START_STATION 起始站
   * @property {string} BUS_END_STATION 目的站
   * @property {string} STARTTIME 起始时间
   * @property {string} ENDTIME 结束时间
   * @property {number} PRICE_NOTE 价格
   * @property {number} TYPE 方向,1-上行，2-下行
   */
  /**
   * 存储使用的线路对象[兼容之前的页面的操作]
   * @param {InputObject} {
   *     SUB_ROUTEID,
   *     BUS_NAME,
   *     BUS_START_STATION,
   *     BUS_END_STATION,
   *     STARTTIME,
   *     ENDTIME,
   *     PRICE_NOTE,
   *     TYPE
   *   } 输入对象
   * @memberof StoreLine
   */
  constructor({
    SUB_ROUTEID,
    BUS_NAME,
    BUS_START_STATION,
    BUS_END_STATION,
    STARTTIME,
    ENDTIME,
    PRICE_NOTE,
    TYPE
  }) {
    this.SUBROUTE_ID = SUB_ROUTEID
    this.SUBROUTE_NAME = BUS_NAME
    this.BUS_START_STATION = BUS_START_STATION
    this.BUS_END_STATION = BUS_END_STATION
    this.START_TIME = STARTTIME
    this.END_TIME = ENDTIME
    this.PRICE = PRICE_NOTE
    this.TYPE = TYPE
    this.GOTO_URL = `Line.html?BUS_DIRECTION=${TYPE}&NAME=${BUS_NAME}&ID=${SUB_ROUTEID}`
  }
}
